﻿using JinfuyuanProject.Entity;
using JinfuyuanProject.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Service
{
    public class SalaryDetailsService : ISalaryDetailsService
    {
        private readonly ISalaryDetailsRepository _salaryDetailsRepository;

        public SalaryDetailsService(ISalaryDetailsRepository salaryDetailsRepository) {
            _salaryDetailsRepository=salaryDetailsRepository;
        }
        public bool Delete(SalaryDetails salaryDetails)
        {
           return _salaryDetailsRepository.Delete(salaryDetails);   
        }

        public IQueryable<SalaryDetails> GetList()
        {
          return _salaryDetailsRepository.GetList();    
        }

        public SalaryDetails GetModel(int Id)
        {
            return _salaryDetailsRepository.GetModel(Id);
        }

        public int Insert(SalaryDetails salaryDetails)
        {
           return _salaryDetailsRepository.Insert(salaryDetails);
        }

        public bool Update(SalaryDetails salaryDetails)
        {
            return _salaryDetailsRepository.Update(salaryDetails);
        }
    }
}
